#ifndef N1LOG_H_2006_07_03
#define N1LOG_H_2006_07_03

#include "N0Lib.h"

enum N1LogLevel { N1Log_Error, N1Log_Info, N1Log_Debug, N1Log_Trace };

/*****************************************************************
  N1Log_Error - critical and important errors.
  N1Log_Info  - info about global program events.
  N1Log_Debug - debug info - any info you need.
  N1Log_Trace - absolutely all info
*****************************************************************/

void N1Log(N1LogLevel logLevel, const char* Format, ...);

void N1LogInitialize();

#define N1Log0(level, format)          N1Log(level, format " (%s:%u)", __FILE__, __LINE__);
#define N1Log1(level, format, p1)      N1Log(level, format " (%s:%u)", p1, __FILE__, __LINE__);
#define N1Log2(level, format, p1, p2)  N1Log(level, format " (%s:%u)", p1, p2, __FILE__, __LINE__);

#define N1LogError(format)           N1Log(N1Log_Error, format " (%s:%u)", __FILE__, __LINE__);
#define N1LogError1(format, p1)      N1Log(N1Log_Error, format " (%s:%u)", p1, __FILE__, __LINE__);
#define N1LogError2(format, p1, p2)  N1Log(N1Log_Error, format " (%s:%u)", p1, p2, __FILE__, __LINE__);

#define N1LogInfo(format)           N1Log(N1Log_Info, format " (%s:%u)", __FILE__, __LINE__);
#define N1LogInfo1(format, p1)      N1Log(N1Log_Info, format " (%s:%u)", p1, __FILE__, __LINE__);
#define N1LogInfo2(format, p1, p2)  N1Log(N1Log_Info, format " (%s:%u)", p1, p2, __FILE__, __LINE__);

#define N1LogDebug(format)           N1Log(N1Log_Debug, format " (%s:%u)", __FILE__, __LINE__);
#define N1LogDebug1(format, p1)      N1Log(N1Log_Debug, format " (%s:%u)", p1, __FILE__, __LINE__);
#define N1LogDebug2(format, p1, p2)  N1Log(N1Log_Debug, format " (%s:%u)", p1, p2, __FILE__, __LINE__);

#define N1LogTrace(format)           N1Log(N1Log_Trace, format " (%s:%u)", __FILE__, __LINE__);
#define N1LogTrace1(format, p1)      N1Log(N1Log_Trace, format " (%s:%u)", p1, __FILE__, __LINE__);
#define N1LogTrace2(format, p1, p2)  N1Log(N1Log_Trace, format " (%s:%u)", p1, p2, __FILE__, __LINE__);

#endif //N1LOG_H_2006_07_03
